"use strict";
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
    var _, done = false;
    for (var i = decorators.length - 1; i >= 0; i--) {
        var context = {};
        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
        if (kind === "accessor") {
            if (result === void 0) continue;
            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
            if (_ = accept(result.get)) descriptor.get = _;
            if (_ = accept(result.set)) descriptor.set = _;
            if (_ = accept(result.init)) initializers.unshift(_);
        }
        else if (_ = accept(result)) {
            if (kind === "field") initializers.unshift(_);
            else descriptor[key] = _;
        }
    }
    if (target) Object.defineProperty(target, contextIn.name, descriptor);
    done = true;
};
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
    var useValue = arguments.length > 2;
    for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
    }
    return useValue ? value : void 0;
};
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
    return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProductInput = void 0;
var graphql_1 = require("@nestjs/graphql");
var ProductInput = function () {
    var _classDecorators = [(0, graphql_1.InputType)()];
    var _classDescriptor;
    var _classExtraInitializers = [];
    var _classThis;
    var _name_decorators;
    var _name_initializers = [];
    var _name_extraInitializers = [];
    var _desc_decorators;
    var _desc_initializers = [];
    var _desc_extraInitializers = [];
    var _stock_decorators;
    var _stock_initializers = [];
    var _stock_extraInitializers = [];
    var _limitBuyNumber_decorators;
    var _limitBuyNumber_initializers = [];
    var _limitBuyNumber_extraInitializers = [];
    var _coverUrl_decorators;
    var _coverUrl_initializers = [];
    var _coverUrl_extraInitializers = [];
    var _bannerUrl_decorators;
    var _bannerUrl_initializers = [];
    var _bannerUrl_extraInitializers = [];
    var _originalPrice_decorators;
    var _originalPrice_initializers = [];
    var _originalPrice_extraInitializers = [];
    var _preferentialPrice_decorators;
    var _preferentialPrice_initializers = [];
    var _preferentialPrice_extraInitializers = [];
    var ProductInput = _classThis = /** @class */ (function () {
        function ProductInput_1() {
            this.name = __runInitializers(this, _name_initializers, void 0);
            this.desc = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _desc_initializers, void 0));
            this.stock = (__runInitializers(this, _desc_extraInitializers), __runInitializers(this, _stock_initializers, void 0));
            this.limitBuyNumber = (__runInitializers(this, _stock_extraInitializers), __runInitializers(this, _limitBuyNumber_initializers, void 0));
            this.coverUrl = (__runInitializers(this, _limitBuyNumber_extraInitializers), __runInitializers(this, _coverUrl_initializers, void 0));
            this.bannerUrl = (__runInitializers(this, _coverUrl_extraInitializers), __runInitializers(this, _bannerUrl_initializers, void 0));
            this.originalPrice = (__runInitializers(this, _bannerUrl_extraInitializers), __runInitializers(this, _originalPrice_initializers, void 0));
            this.preferentialPrice = (__runInitializers(this, _originalPrice_extraInitializers), __runInitializers(this, _preferentialPrice_initializers, void 0));
            __runInitializers(this, _preferentialPrice_extraInitializers);
        }
        return ProductInput_1;
    }());
    __setFunctionName(_classThis, "ProductInput");
    (function () {
        var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
        _name_decorators = [(0, graphql_1.Field)({
                description: '名称',
            })];
        _desc_decorators = [(0, graphql_1.Field)({
                description: '描述',
                nullable: true,
            })];
        _stock_decorators = [(0, graphql_1.Field)({
                description: '库存总数',
            })];
        _limitBuyNumber_decorators = [(0, graphql_1.Field)({
                description: '每人限购数量',
            })];
        _coverUrl_decorators = [(0, graphql_1.Field)({
                description: '封面图',
            })];
        _bannerUrl_decorators = [(0, graphql_1.Field)({
                description: '头部banner图',
            })];
        _originalPrice_decorators = [(0, graphql_1.Field)({
                description: '原价',
            })];
        _preferentialPrice_decorators = [(0, graphql_1.Field)({
                description: '优惠价',
            })];
        __esDecorate(null, null, _name_decorators, { kind: "field", name: "name", static: false, private: false, access: { has: function (obj) { return "name" in obj; }, get: function (obj) { return obj.name; }, set: function (obj, value) { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
        __esDecorate(null, null, _desc_decorators, { kind: "field", name: "desc", static: false, private: false, access: { has: function (obj) { return "desc" in obj; }, get: function (obj) { return obj.desc; }, set: function (obj, value) { obj.desc = value; } }, metadata: _metadata }, _desc_initializers, _desc_extraInitializers);
        __esDecorate(null, null, _stock_decorators, { kind: "field", name: "stock", static: false, private: false, access: { has: function (obj) { return "stock" in obj; }, get: function (obj) { return obj.stock; }, set: function (obj, value) { obj.stock = value; } }, metadata: _metadata }, _stock_initializers, _stock_extraInitializers);
        __esDecorate(null, null, _limitBuyNumber_decorators, { kind: "field", name: "limitBuyNumber", static: false, private: false, access: { has: function (obj) { return "limitBuyNumber" in obj; }, get: function (obj) { return obj.limitBuyNumber; }, set: function (obj, value) { obj.limitBuyNumber = value; } }, metadata: _metadata }, _limitBuyNumber_initializers, _limitBuyNumber_extraInitializers);
        __esDecorate(null, null, _coverUrl_decorators, { kind: "field", name: "coverUrl", static: false, private: false, access: { has: function (obj) { return "coverUrl" in obj; }, get: function (obj) { return obj.coverUrl; }, set: function (obj, value) { obj.coverUrl = value; } }, metadata: _metadata }, _coverUrl_initializers, _coverUrl_extraInitializers);
        __esDecorate(null, null, _bannerUrl_decorators, { kind: "field", name: "bannerUrl", static: false, private: false, access: { has: function (obj) { return "bannerUrl" in obj; }, get: function (obj) { return obj.bannerUrl; }, set: function (obj, value) { obj.bannerUrl = value; } }, metadata: _metadata }, _bannerUrl_initializers, _bannerUrl_extraInitializers);
        __esDecorate(null, null, _originalPrice_decorators, { kind: "field", name: "originalPrice", static: false, private: false, access: { has: function (obj) { return "originalPrice" in obj; }, get: function (obj) { return obj.originalPrice; }, set: function (obj, value) { obj.originalPrice = value; } }, metadata: _metadata }, _originalPrice_initializers, _originalPrice_extraInitializers);
        __esDecorate(null, null, _preferentialPrice_decorators, { kind: "field", name: "preferentialPrice", static: false, private: false, access: { has: function (obj) { return "preferentialPrice" in obj; }, get: function (obj) { return obj.preferentialPrice; }, set: function (obj, value) { obj.preferentialPrice = value; } }, metadata: _metadata }, _preferentialPrice_initializers, _preferentialPrice_extraInitializers);
        __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
        ProductInput = _classThis = _classDescriptor.value;
        if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        __runInitializers(_classThis, _classExtraInitializers);
    })();
    return ProductInput = _classThis;
}();
exports.ProductInput = ProductInput;
